<template>
  <div class="login">
    <div class="login_bg">
      <van-icon name="arrow-left" @click="goBack()"/>
      <div class="log_logo">
        <img src="https://stnz.oss-cn-hangzhou.aliyuncs.com/assets/images/logo.png">
      </div>
      <!-- 验证码登录 -->
      <div class="pd_log">
      <div class="pdlog_one">
        <div></div>
        <p>选择登陆方式</p>
        <div></div>
      </div>
            <div class="yf_submitBtn" @click="getAuthCode()">
                <img src="https://stnz.oss-cn-hangzhou.aliyuncs.com/assets/images/log_wx.png"/>
                 <p>微信登录</p>
            </div>

           <!-- <div @click="thisAjax" class="submitBtn">
              验证码登录
            </div> -->
      </div>
    </div>
  </div>
</template>

<script>


  export default {
    name: "login",
    data () {
      return {

      }
    },
    methods: {
      goBack() {
        this.$router.back();
      },
      //  微信登录
      getAuthCode() {
          //this.$router.redirect
          var responseUrl=encodeURIComponent("http://www.mysoule.com/bindOrRegister");
          window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx994320d0aac3cee8&redirect_uri="+responseUrl+"&response_type=code&scope=snsapi_userinfo#wechat_redirect";
          console.log("00",window.location.href)
      },
      // 验证码登录
      thisAjax(){
        this.$router.push({path: '/bindOrRegister'})
      },
        test(){
            let beforeLoginUrl = localStorage.getItem('beforeLoginUrl');
          console.log(beforeLoginUrl);
        }

    }

    }


</script>

<style scoped>
  .login{width: 100%;background-color:#fff;height: 100%; min-height: 100vh;}
  .log_logo{width: 35%;margin: 0 auto;}
  .log_logo img{width: 100%;padding-top:0.2rem;}
  .login_bg i{font-size: 0.2rem;padding: 0.15rem 0.15rem 0}
  .pdlog_one{width: 90%;margin: 0 auto;overflow: hidden;}
  .pdlog_one div{width: 32%;border-bottom: 1px solid #000;float: left;margin-top: 0.2rem;}
  .pdlog_one p{width: 36%;line-height: 0.4rem;font-size: 0.16rem;text-align: center;float: left;}
  .pd_log{padding-top: 0.5rem;font-size: 0;}
  .pdl_side img{width: 0.2rem;position: relative;top: 0.05rem;}
  .pdl_cont input{height:0.4rem;width: 100%;background-color: hsla(0,0%,47%,.1);;outline: none;border: 0;font-size: 0.14rem;position: relative;top:0;left: 0.1rem; color: white;}
  .pdl_cont input::-webkit-input-placeholder{color:#FFF;font-size: 0.14rem;}
  .yf_submitBtn{background: #01bf47;color: #fff;font-size: 0.14rem;width: 80%;line-height:0.4rem;border-radius: 0.05rem;overflow: hidden;margin: 0.05rem auto 0;}
  .yf_submitBtn img{width: 0.24rem;float:left;margin-left: 1rem;margin-top: 0.1rem}
  .yf_submitBtn p{float: left;font-size: 0.14rem;color: #fff;padding-left: 0.1rem}
  .submitBtn{text-align: center;background: #fff;color: #01bf47;font-size: 0.14rem;width: 80%;line-height:0.4rem;border-radius: 0.05rem;overflow: hidden;margin: 0.1rem auto;border: 1px solid #01bf47}



</style>
